/*-----------------------------------------
file name  : rdy_agent.sv
created    : 2025/10/04 11:32:47
modified   : 2025-10-04 11:41:55
description: 
notes      : 
author     : yyrwkk
-----------------------------------------*/
`ifndef RDY_AGENT__SV
`define RDY_AGENT__SV
class rdy_agent extends uvm_agent;

    `uvm_componet_utils(rdy_agent)

    rdy_generator rdy_gen;
    rdy_driver    rdy_drv;

    extern function new(string name="rdy_agent",uvm_component parent=null);
    extern function void build_phase(uvm_phase phase);
    extern function void connect_phase(uvm_phase phase);
endclass

function rdy_agent::new(string name="rdy_agent",uvm_component parent=null);
    super.new(name,parent);
endfunction 

function rdy_agent::build_phase(uvm_phase phase);
    super.build_phase(phase);
    rdy_gen = rdy_generator::type_id::create("rdy_gen",this);
    rdy_dirver = rdy_driver::typd_id::create("rdy_drv",this);
endfunction 

function void rdy_agent::connect_phase(uvm_phase);
    super.connect_phase(phase);
    rdy_driver.from_rdy_generator_bp.connect(rdy_gen.to_rdy_driver_imp);
endfunction 

`endif

